/*!
 * browser-tool v1.3.1
 * Useragent analysis tool.
 * https://passer-by.com/browser/
 *
 * Copyright (c) 2017-present, HaoLe Zheng
 *
 * Released under the MIT License
 * https://github.com/mumuy/browser
 *
 * Created on: 2024-08-01
 */
!function (e, n) {
    "object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define(n) : (e = "undefined" != typeof globalThis ? globalThis : e || self).browser = n()
}(this, (function () {
    "use strict";
    let e = {};
    "undefined" != typeof globalThis ? e = globalThis : "undefined" != typeof self ? e = self : "undefined" != typeof window ? e = window : "undefined" != typeof global && (e = global);
    var n, i = e, r = null == i || null === (n = i.navigator) || void 0 === n ? void 0 : n.userAgent, a = {
        name: "Safari", parse(e = r) {
            var n;
            return {
                is: e.includes("Safari"),
                version: (null === (n = e.match(/Version\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, o = {
        name: "Chrome", parse(e = r) {
            var n, i;
            return {
                is: e.includes("Chrome") || e.includes("CriOS"),
                version: (null === (n = e.match(/Chrome\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/CriOS\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
            }
        }
    }, s = {
        name: "Edge", parse(e = r) {
            var n, i, a, o;
            return {
                is: e.includes("Edge") || e.includes("Edg/") || e.includes("EdgA") || e.includes("EdgiOS"),
                version: (null === (n = e.match(/Edge\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/Edg\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || (null === (a = e.match(/EdgA\/([\d.]+)/)) || void 0 === a ? void 0 : a[1]) || (null === (o = e.match(/EdgiOS\/([\d.]+)/)) || void 0 === o ? void 0 : o[1]) || ""
            }
        }
    }, l = {
        name: "IE", parse(e = r) {
            var n, i;
            return {
                is: e.includes("MSIE") || e.includes("Trident"),
                version: (null === (n = e.match(/MSIE ([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/rv:([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
            }
        }
    }, t = {
        name: "Firefox", parse(e = r) {
            var n, i;
            return {
                is: e.includes("Firefox") || e.includes("FxiOS"),
                version: (null === (n = e.match(/Firefox\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/FxiOS\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
            }
        }
    }, d = {
        name: "Firefox Focus", parse(e = r) {
            var n;
            return {
                is: e.includes("Focus"),
                version: (null === (n = e.match(/Focus\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, u = {
        name: "Chromium", parse(e = r) {
            var n;
            return {
                is: e.includes("Chromium"),
                version: (null === (n = e.match(/Chromium\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, v = {
        name: "Opera", parse(e = r) {
            var n, i;
            return {
                is: e.includes("Opera") || e.includes("OPR"),
                version: (null === (n = e.match(/Opera\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/OPR\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
            }
        }
    }, c = {
        name: "Opera GX", parse(e = r) {
            let n = !1;
            return v.parse(e).is && (n = e.includes("Edition GX")), {is: n, version: v.parse(e).version}
        }
    }, m = {
        name: "Vivaldi", parse(e = r) {
            var n, i;
            return {
                is: e.includes("Vivaldi"),
                version: (null === (n = e.match(/Vivaldi\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/Chrome\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
            }
        }, async is() {
            let e = this.parse().is;
            return new Promise((function (n) {
                e ? n(!1) : fetch("chrome-extension://jffbochibkahlbbmanpmndnhmeliecah/config.json").then((function () {
                    n(!0)
                })).catch((function () {
                    n(!1)
                }))
            }))
        }
    }, p = {
        name: "Yandex", parse(e = r) {
            var n;
            return {
                is: e.includes("YaBrowser"),
                version: (null === (n = e.match(/YaBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, h = {
        name: "Brave", parse(e = r) {
            var n;
            return {
                is: e.includes("Brave"),
                version: (null === (n = e.match(/Chrome\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }, is: async function () {
            var e;
            return !!(this.parse().is || null != i && null !== (e = i.navigator) && void 0 !== e && e.brave)
        }
    }, g = {
        name: "Arora", parse(e = r) {
            var n;
            return {
                is: e.includes("Arora"),
                version: (null === (n = e.match(/Arora\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, f = {
        name: "Lunascape", parse(e = r) {
            var n;
            return {
                is: e.includes("Lunascape"),
                version: (null === (n = e.match(/Lunascape[\/\s]([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, w = {
        name: "QupZilla", parse(e = r) {
            var n;
            return {
                is: e.includes("QupZilla"),
                version: (null === (n = e.match(/QupZilla[\/\s]([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, b = {
        name: "Coc Coc", parse(e = r) {
            var n;
            return {
                is: e.includes("coc_coc_browser"),
                version: (null === (n = e.match(/coc_coc_browser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, y = {
        name: "Kindle", parse(e = r) {
            var n;
            return {
                is: e.includes("Kindle") || e.includes("Silk/"),
                version: (null === (n = e.match(/Version\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, B = {
        name: "Iceweasel", parse(e = r) {
            var n;
            return {
                is: e.includes("Iceweasel"),
                version: (null === (n = e.match(/Iceweasel\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, S = {
        name: "Konqueror", parse(e = r) {
            var n;
            return {
                is: e.includes("Konqueror"),
                version: (null === (n = e.match(/Konqueror\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, E = {
        name: "Iceape", parse(e = r) {
            var n;
            return {
                is: e.includes("Iceape"),
                version: (null === (n = e.match(/Iceape\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, T = {
        name: "SeaMonkey", parse(e = r) {
            var n;
            return {
                is: e.includes("SeaMonkey"),
                version: (null === (n = e.match(/SeaMonkey\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, A = {
        name: "Epiphany", parse(e = r) {
            var n;
            return {
                is: e.includes("Epiphany"),
                version: (null === (n = e.match(/Epiphany\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, I = {
        name: "Huawei", parse(e = r) {
            var n, i, a;
            return {
                is: e.includes("HuaweiBrowser") || e.includes("HBPC/"),
                version: (null === (n = e.match(/HuaweiBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/HBPC\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || (null === (a = e.match(/Version\/([\d.]+)/)) || void 0 === a ? void 0 : a[1]) || ""
            }
        }
    }, M = {
        name: "OPPO", parse(e = r) {
            var n;
            return {
                is: e.includes("HeyTapBrowser") || e.includes("OPPO"),
                version: (null === (n = e.match(/HeyTapBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, x = {
        name: "Vivo", parse(e = r) {
            var n;
            return {
                is: e.includes("VivoBrowser"),
                version: (null === (n = e.match(/VivoBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, O = {
        name: "Xiaomi", parse(e = r) {
            var n;
            return {
                is: e.includes("MiuiBrowser"),
                version: (null === (n = e.match(/115Browser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, P = {
        name: "Meizu", parse(e = r) {
            var n;
            return {
                is: e.includes("MZBrowser"),
                version: (null === (n = e.match(/MZBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, k = {name: "OnePlus", parse: (e = r) => ({is: e.includes("ONEPLUS"), version: ""})}, W = {
        name: "Samsung", parse(e = r) {
            var n;
            return {
                is: e.includes("SamsungBrowser"),
                version: (null === (n = e.match(/SamsungBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    };

    function C(e, n) {
        var i;
        let r = null === globalThis || void 0 === globalThis || null === (i = globalThis.navigator) || void 0 === i ? void 0 : i.mimeTypes;
        for (let i in r) if (r[i][e] && r[i][e] == n) return r[i];
        return null
    }

    var D = {
        name: "360", parse(e = r) {
            var n, i;
            return {
                is: e.includes("QihooBrowser") || e.includes("QHBrowser") || e.includes(" 360 "),
                version: (null === (n = e.match(/QihooBrowser(HD)?\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/Browser \(v([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
            }
        }, async is() {
            let e = this.parse().is;
            if (null != i && i.chrome) {
                let n = parseInt(o.parse().version);
                C("type", "application/360softmgrplugin") || C("type", "application/mozilla-npqihooquicklogin") || C("type", "application/npjlgplayer3-chrome-jlp") || n > 36 && null != i && i.showModalDialog ? e = !0 : n > 45 && (e = C("type", "application/vnd.chromium.remoting-viewer"), !e && n >= 69 && (e = C("type", "application/asx")))
            }
            return e
        }
    }, Q = {
        name: "360SE", parse(e = r) {
            let n = parseInt(o.parse(e).version);
            return {
                is: e.includes("360SE"),
                version: {
                    122: "15.3",
                    114: "15.0",
                    108: "14.0",
                    86: "13.0",
                    78: "12.0",
                    69: "11.0",
                    63: "10.0",
                    55: "9.1",
                    45: "8.1",
                    42: "8.0",
                    31: "7.0",
                    21: "6.3"
                }[n] || ""
            }
        }, async is() {
            let e = !1;
            var n;
            await D.is() && ((C("type", "application/gameplugin") || null != i && null !== (n = i.navigator) && void 0 !== n && null !== (n = n.userAgentData) && void 0 !== n && n.brands.filter((e => "Not.A/Brand" == e.brand)).length) && (e = !0));
            return e || new Promise((function (e) {
                fetch("chrome-extension://fjbbmgamncjadhlpmffehlmmkdnkiadk/css/content.css").then((function () {
                    e(!0)
                })).catch((function () {
                    e(!1)
                }))
            }))
        }
    }, L = {
        name: "360EE",
        parse(e = (e => null === globalThis || void 0 === globalThis || null === (e = globalThis.navigator) || void 0 === e ? void 0 : e.userAgent)()) {
            var n;
            let i = parseInt(o.parse(e).version);
            return {
                is: e.includes("360EE"),
                version: (null === (n = e.match(/Browser \(v([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || {
                    122: "22.3",
                    119: "22.0",
                    108: "14.0",
                    95: "21.0",
                    86: "13.0",
                    78: "12.0",
                    69: "11.0",
                    63: "9.5",
                    55: "9.0",
                    50: "8.7",
                    30: "7.5"
                }[i] || ""
            }
        },
        async is() {
            let e = this.parse().is;
            if (C("type", "application/cenroll.cenroll.version.1") || C("type", "application/hwepass2001.installepass2001")) e = !0; else if (await D.is()) {
                var n;
                null !== globalThis && void 0 !== globalThis && null !== (n = globalThis.navigator) && void 0 !== n && null !== (n = n.userAgentData) && void 0 !== n && n.brands.find((e => "Not A(Brand" == e.brand || "Not?A_Brand" == e.brand)) && (e = !0)
            }
            return e
        }
    }, V = {
        name: "360AI", parse(e = r) {
            let n = parseInt(o.parse(e).version);
            return {is: e.includes("360SEAI"), version: {114: "1.0"}[n] || ""}
        }, async is() {
            let e = this.parse().is;
            var n;
            await D.is() && (null != i && null !== (n = i.navigator) && void 0 !== n && null !== (n = n.userAgentData) && void 0 !== n && n.brands.filter((e => "Not.A/Brand" == e.brand)).length && !C("type", "application/gameplugin") && (e = !0));
            return e
        }
    }, H = {
        name: "360AI", parse(e = r) {
            var n;
            return {
                is: e.includes("360EEAI"),
                version: (null === (n = e.match(/360EE\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    };
    const _ = () => new Promise((e => {
        var n;
        const r = `cv_${(new Date).getTime() % 1e5}${100 * Math.floor(Math.random())}`,
            a = {key: "GetDeviceInfo", data: {}, callback: r}, o = JSON.stringify(a);
        if (null == i || null === (n = i.webkit) || void 0 === n || !n.messageHandlers) return e({});
        i.webkit.messageHandlers.excuteCmd.postMessage(o), i[r] = function (n) {
            delete i[r], e(JSON.parse(n || "{}"))
        }
    }));
    var F = {
            name: "360EE", parse: () => ({is: !1, version: ""}), is: async () => _().then((function (e) {
                return "360csexm" == (null == e ? void 0 : e.pid) || !1
            })), version: async () => _().then((function (e) {
                return (null == e ? void 0 : e.module_version) || ""
            }))
        }, N = {
            name: "360ENT", parse(e = r) {
                var n;
                let i = parseInt(o.parse(e).version);
                return {
                    is: e.includes("360ENT"),
                    version: (null === (n = e.match(/Browser \(v([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || {
                        86: "13.0",
                        78: "12.0",
                        69: "11.0",
                        63: "9.5",
                        55: "9.0",
                        50: "8.7",
                        30: "7.5"
                    }[i] || ""
                }
            }
        }, R = {
            name: "UC", parse(e = r) {
                var n;
                return {
                    is: e.includes("UCBrowser") || e.includes(" UBrowser") || e.includes("UCWEB"),
                    version: (null === (n = e.match(/UC?Browser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, Y = {
            name: "QQBrowser", parse(e = r) {
                var n;
                return {
                    is: e.includes("QQBrowser"),
                    version: (null === (n = e.match(/QQBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, U = {
            name: "QQ", parse(e = r) {
                var n;
                return {
                    is: e.includes("QQ/"),
                    version: (null === (n = e.match(/QQ\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, G = {
            name: "Baidu", parse(e = r) {
                var n, i;
                return {
                    is: e.includes("Baidu") || e.includes("BIDUBrowser") || e.includes("baidubrowser") || e.includes("baiduboxapp") || e.includes("BaiduD"),
                    version: (null === (n = e.match(/BIDUBrowser[\s\/]([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/baiduboxapp\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
                }
            }
        }, j = {
            name: "Maxthon", parse(e = r) {
                var n, i;
                let a = parseInt(o.parse(e).version);
                return {
                    is: e.includes("Maxthon"),
                    version: (null === (n = e.match(/Maxthon\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/Version\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || {
                        109: "7.0",
                        78: "6.0"
                    }[a] || ""
                }
            }, is() {
                return this.parse().is || (null == i ? void 0 : i.maxthon)
            }
        }, q = {
            name: "Sogou", parse(e = r) {
                var n, i, a = parseInt(o.parse(e).version);
                return {
                    is: e.includes("MetaSr") || e.includes("Sogou"),
                    version: (null === (n = e.match(/SogouMobileBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/SogouMSE\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || {
                        94: "12.0",
                        80: "11.0"
                    }[a] || ""
                }
            }
        }, K = {
            name: "Liebao", parse(e = r) {
                var n;
                let i = parseInt(o.parse(e).version);
                return {
                    is: e.includes("LBBROWSER") || e.includes("LieBaoFast"),
                    version: (null === (n = e.match(/LieBaoFast\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || {
                        112: "9.0",
                        79: "8.0",
                        57: "6.5",
                        49: "6.0",
                        46: "5.9",
                        42: "5.3",
                        39: "5.2",
                        34: "5.0",
                        29: "4.5",
                        21: "4.0"
                    }[i] || ""
                }
            }, is() {
                return this.parse().is || (null == i ? void 0 : i.liebao)
            }
        }, z = {
            name: "2345Explorer", parse(e = r) {
                var n, i;
                let a = parseInt(o.parse(e).version);
                return {
                    is: e.includes("2345Explorer") || e.includes("Mb2345Browser") || e.includes("2345chrome"),
                    version: (null === (n = e.match(/2345Explorer\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/Mb2345Browser\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || {
                        109: "13.0",
                        69: "10.0",
                        55: "9.9"
                    }[a] || ""
                }
            }, async is() {
                let e = this.parse().is;
                var n, r;
                e || (e = (null == i ? void 0 : i.chrome) && ((null == i || null === (n = i.chrome) || void 0 === n ? void 0 : n.adblock2345) || (null == i || null === (r = i.chrome) || void 0 === r ? void 0 : r.common2345)));
                return e
            }
        }, X = {
            name: "115Browser", parse(e = r) {
                var n;
                return {
                    is: e.includes("115Browser"),
                    version: (null === (n = e.match(/115Browser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, Z = {
            name: "TheWorld", parse(e = r) {
                var n;
                return {
                    is: e.includes("TheWorld"),
                    version: (null === (n = e.match(/TheWorld ([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, $ = {
            name: "Quark", parse(e = r) {
                var n, i;
                return {
                    is: e.includes("Quark"),
                    version: (null === (n = e.match(/Quark\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/QuarkPC\/([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
                }
            }
        }, J = {
            name: "Qiyu", parse(e = r) {
                var n;
                return {
                    is: e.includes("Qiyu"),
                    version: (null === (n = e.match(/Qiyu\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, ee = {
            name: "Lenovo", parse(e = r) {
                var n;
                return {
                    is: e.includes("SLBrowser"),
                    version: (null === (n = e.match(/SLBrowser\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, ne = {
            name: "Wechat", parse(e = r) {
                var n;
                return {
                    is: e.includes("MicroMessenger"),
                    version: (null === (n = e.match(/MicroMessenger\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, ie = {
            name: "WechatWork", parse(e = r) {
                var n;
                return {
                    is: e.includes("wxwork"),
                    version: (null === (n = e.match(/wxwork\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, re = {
            name: "Taobao", parse(e = r) {
                var n;
                return {
                    is: e.includes("AliApp(TB"),
                    version: (null === (n = e.match(/AliApp\(TB\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, ae = {
            name: "Alipay", parse(e = r) {
                var n;
                return {
                    is: e.includes("AliApp(AP"),
                    version: (null === (n = e.match(/AliApp\(AP\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, oe = {
            name: "Weibo", parse(e = r) {
                var n;
                return {
                    is: e.includes("Weibo"),
                    version: (null === (n = e.match(/weibo__([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, se = {
            name: "Douban", parse(e = r) {
                var n;
                return {
                    is: e.includes("com.douban.frodo"),
                    version: (null === (n = e.match(/com.douban.frodo\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, le = {
            name: "Toutiao", parse(e = r) {
                var n;
                return {
                    is: e.includes("NewsArticle"),
                    version: (null === (n = e.match(/NewsArticle\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
                }
            }
        }, te = {name: "WebKit", parse: (e = r) => ({is: e.includes("AppleWebKit")})},
        de = {name: "Trident", parse: (e = r) => ({is: e.includes("Trident") || e.includes("NET CLR")})},
        ue = {name: "Gecko", parse: (e = r) => ({is: e.includes("Gecko/")})},
        ve = {name: "Servo", parse: (e = r) => ({is: e.includes("Servo/")})},
        ce = {name: "Presto", parse: (e = r) => ({is: e.includes("Presto")})},
        me = {name: "KHTML", parse: (e = r) => ({is: e.includes("KHTML/")})};
    let pe = [a, o, s, l, t, d, u, v, c, m, p, h, g, f, w, b, y, B, S, E, T, A, I, M, x, O, P, k, W, D, L, Q, F, V, H, N, R, Y, U, G, j, q, K, z, X, Z, $, J, ee, ne, ie, re, ae, oe, se, {
        name: "Suning",
        parse(e = r) {
            var n;
            return {
                is: e.includes("SNEBUY-APP"),
                version: (null === (n = e.match(/SNEBUY-APP([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "iQIYI", parse(e = r) {
            var n;
            return {
                is: e.includes("IqiyiApp"),
                version: (null === (n = e.match(/IqiyiVersion\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "DingTalk", parse(e = r) {
            var n;
            return {
                is: e.includes("DingTalk"),
                version: (null === (n = e.match(/DingTalk\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "Douyin", parse(e = r) {
            var n;
            return {
                is: e.includes("aweme"),
                version: (null === (n = e.match(/app_version\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, le, {
        name: "Googlebot", parse(e = r) {
            var n;
            return {
                is: e.includes("Googlebot"),
                version: (null === (n = e.match(/Googlebot\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "Baiduspider", parse(e = r) {
            var n;
            return {
                is: e.includes("Baiduspider"),
                version: (null === (n = e.match(/Baiduspider(-render)?\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "Sogouspider", parse(e = r) {
            var n;
            return {
                is: e.match(/Sogou (\S+) Spider\/([\d.]+)/i),
                version: (null === (n = e.match(/Sogou (\S+) Spider\/([\d.]+)/i)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "Bingbot", parse(e = r) {
            var n;
            return {
                is: e.includes("bingbot"),
                version: (null === (n = e.match(/bingbot\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "360Spider",
        parse: (e = r) => ({is: e.includes("360Spider") || e.includes("HaosouSpider"), version: ""})
    }, {name: "Bytespider", parse: (e = r) => ({is: e.includes("Bytespider"), version: ""})}, {
        name: "YisouSpider",
        parse(e = r) {
            var n;
            return {
                is: e.includes("YisouSpider"),
                version: (null === (n = e.match(/YisouSpider\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "YodaoBot", parse(e = r) {
            var n;
            return {
                is: e.includes("YodaoBot"),
                version: (null === (n = e.match(/YodaoBot\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "YandexBot", parse(e = r) {
            var n;
            return {
                is: e.includes("YandexBot"),
                version: (null === (n = e.match(/YandexBot\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }];
    pe.forEach((e => {
        e.is || (e.is = async function () {
            return e.parse().is
        }), e.version || (e.version = async function () {
            return e.parse().version
        })
    }));
    let he = [te, de, ue, ve, ce, me];
    he.forEach((e => {
        e.is || (e.is = async function () {
            return e.parse().is
        })
    }));
    var ge = {
        name: "browser", parse(e = r) {
            let n = "", i = "";
            pe.forEach((function (r) {
                r.parse(e).is && (n = r.name, i = r.parse(e).version)
            }));
            let a = "";
            var l, t;
            (he.forEach((function (n) {
                n.parse(e).is && (a = n.name)
            })), "Chrome" == n && e.match(/\S+Browser/) && (n = e.match(/\S+Browser/)[0]), "Chrome" == n && e.match(/\S+Browser/)) && (i = (null === (l = e.replace(/^.*Browser\/([\d.]+).*$/)) || void 0 === l ? void 0 : l[1]) || "");
            i || (i = (null === (t = e.match(/Version\/([\d.]+)/)) || void 0 === t ? void 0 : t[1]) || "");
            s.parse(e).is ? a = parseInt(s.parse(e).version) > 75 ? "Blink" : "EdgeHTML" : o.parse(e).is && parseInt(o.parse(e).version) > 27 && (a = "Blink");
            let d = e.includes("; wv)"),
                u = ["Googlebot", "Baiduspider", "Sogouspider", "Bingbot", "360Spider", "Bytespider", "YandexBot"].includes(n);
            return {browser: n, browserVersion: i, engine: a, isWebview: d, isRobot: u}
        }, async getInfo() {
            let {browser: e, browserVersion: n, engine: i, isWebview: a, isRobot: o} = this.parse();
            for (let i of pe) await i.is() && (e = i.name, n = await i.version());
            let s = r;
            var l, t;
            ("Chrome" == e && s.match(/\S+Browser/) && (e = s.match(/\S+Browser/)[0]), "Chrome" == e && s.match(/\S+Browser/)) && (n = (null === (l = s.replace(/^.*Browser\/([\d.]+).*$/)) || void 0 === l ? void 0 : l[1]) || "");
            n || (n = (null === (t = s.match(/Version\/([\d.]+)/)) || void 0 === t ? void 0 : t[1]) || "");
            return {browser: e, browserVersion: n, engine: i, isWebview: a, isRobot: o, userAgent: s}
        }
    }, fe = {
        name: "Windows", parse(e = r) {
            var n;
            let i = (null === (n = e.match(/^Mozilla\/\d.0 \(Windows NT ([\d.]+)[;)].*$/)) || void 0 === n ? void 0 : n[1]) || "";
            return {
                is: e.includes("Windows"),
                version: {
                    "10.0": "10",
                    6.4: "10 Technical Preview",
                    6.3: "8.1",
                    6.2: "8",
                    6.1: "7",
                    "6.0": "Vista",
                    5.2: "XP 64-bit",
                    5.1: "XP",
                    5.01: "2000 SP1",
                    "5.0": "2000",
                    "4.0": "NT",
                    "4.90": "ME"
                }[i] || i
            }
        }, async version() {
            let e = this.parse().version;
            return new Promise((function (n) {
                var r;
                null != i && null !== (r = i.navigator) && void 0 !== r && r.userAgentData ? i.navigator.userAgentData.getHighEntropyValues(["platformVersion"]).then((function (e) {
                    let r = "";
                    if ("Windows" === i.navigator.userAgentData.platform) {
                        r = parseInt(e.platformVersion.split(".")[0]) >= 13 ? "11" : "10"
                    }
                    n(r)
                })) : n(e)
            }))
        }
    };
    let we = [fe, {
        name: "Linux",
        parse: (e = r) => ({is: e.includes("Linux") || e.includes("X11"), version: ""})
    }, {
        name: "macOS", parse(e = r) {
            var n;
            return {
                is: e.includes("Macintosh"),
                version: (null === (n = e.match(/Mac OS X -?([\d_]+)/)) || void 0 === n ? void 0 : n[1].replace(/_/g, ".")) || ""
            }
        }
    }, {
        name: "Android", parse(e = r) {
            var n;
            return {
                is: e.includes("Android") || e.includes("Adr"),
                version: (null === (n = e.match(/Android ([\d.]+);/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "HarmonyOS", parse(e = r) {
            var n;
            let i = +(null === (n = e.match(/HMSCore (\d+.\d+)/)) || void 0 === n ? void 0 : n[1]) || 0, a = "";
            return i >= 6.1 ? a = "4.0" : i >= 6 ? a = "3.0" : i >= 5 ? a = "2.0" : i >= 4 && (a = "1.0"), {
                is: e.includes("HarmonyOS"),
                version: a
            }
        }
    }, {name: "Ubuntu", parse: (e = r) => ({is: e.includes("Ubuntu"), version: ""})}, {
        name: "FreeBSD",
        parse: (e = r) => ({is: e.includes("FreeBSD"), version: ""})
    }, {
        name: "Debian", parse(e = r) {
            var n;
            return {
                is: e.includes("Debian"),
                version: (null === (n = e.match(/Debian\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "iOS", parse(e = r) {
            var n;
            return {
                is: e.includes("like Mac OS X"),
                version: (null === (n = e.match(/OS ([\d_]+) like/)) || void 0 === n ? void 0 : n[1].replace(/_/g, ".")) || ""
            }
        }
    }, {
        name: "Windows Phone", parse(e = r) {
            var n;
            return {
                is: e.includes("IEMobile") || e.includes("Windows Phone"),
                version: (null === (n = e.match(/Windows Phone( OS)? ([\d.]+);/)) || void 0 === n ? void 0 : n[2]) || ""
            }
        }
    }, {
        name: "BlackBerry",
        parse: (e = r) => ({is: e.includes("BlackBerry") || e.includes("RIM"), version: ""})
    }, {name: "MeeGo", parse: (e = r) => ({is: e.includes("MeeGo"), version: ""})}, {
        name: "Symbian", parse(e = r) {
            var n;
            return {
                is: e.includes("Symbian"),
                version: (null === (n = e.match(/Series60\/([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }, {
        name: "Chrome OS", parse(e = r) {
            var n, i;
            return {
                is: e.includes("CrOS"),
                version: (null === (n = e.match(/MSIE ([\d.]+)/)) || void 0 === n ? void 0 : n[1]) || (null === (i = e.match(/rv:([\d.]+)/)) || void 0 === i ? void 0 : i[1]) || ""
            }
        }
    }, {
        name: "WebOS", parse(e = r) {
            var n;
            return {
                is: e.includes("hpwOS"),
                version: (null === (n = e.match(/hpwOS\/([\d.]+);/)) || void 0 === n ? void 0 : n[1]) || ""
            }
        }
    }];
    we.forEach((e => {
        e.is || (e.is = async function () {
            return e.parse().is
        }), e.version || (e.version = async function () {
            return e.parse().version
        })
    }));
    var be = {
        name: "system", parse(e = r) {
            let n = "", i = "";
            we.forEach((function (r) {
                r.parse(e).is && (n = r.name, i = r.parse(e).version)
            }));
            let a = "";
            e.match(/(Win64|x64|WOW64|x86_64)/i) ? a = "Win64" : e.match(/(Win32|x86|WOW32)/i) ? a = "Win32" : e.match(/aarch64|arm64/) ? a = "ARM64" : e.match(/arm32/) && (a = "ARM32");
            let o = "", s = e + "|" + a;
            o = s.match(/armv?\d+/i) || s.match(/aarch64/) ? "arm" : s.match(/loongarch64/) ? "loongarch" : "x86";
            let l = e.match(/Win64|x64|WOW64|x86_64|aarch64|arm64|loongarch64/i) ? 64 : 32;
            return {system: n, systemVersion: i, platform: a, architecture: o, bitness: l}
        }, async getInfo() {
            var e, n;
            let {system: r, systemVersion: a, platform: o, architecture: s, bitness: l} = this.parse();
            for (let e of we) await e.is() && (r = e.name, a = await e.version());
            var t, d;
            (null != i && null !== (e = i.navigator) && void 0 !== e && e.platform && (o = i.navigator.platform), null != i && null !== (n = i.navigator) && void 0 !== n && n.userAgentData) && (s = await (null === (t = i.navigator.userAgentData) || void 0 === t ? void 0 : t.getHighEntropyValues(["architecture"]).then((e => e.architecture || s))), l = await (null === (d = i.navigator.userAgentData) || void 0 === d ? void 0 : d.getHighEntropyValues(["bitness"]).then((e => +e.bitness || l))));
            return {system: r, systemVersion: a, platform: o, architecture: s, bitness: l}
        }
    };
    let ye = [{
        name: "Mobile",
        parse: (e = r) => ({is: e.includes("Mobi") || e.includes("iPh") || e.includes("480")})
    }, {
        name: "Tablet",
        parse: (e = r) => ({is: e.includes("Tablet") || e.includes("Pad") || e.includes("Nexus 7")}),
        async is() {
            return this.parse().is || "MacIntel" === (null == i ? void 0 : i.navigator.platform) && (null == i ? void 0 : i.navigator.maxTouchPoints) > 1
        }
    }];
    ye.forEach((e => {
        e.is || (e.is = async function () {
            return e.parse().is
        })
    }));
    var Be = {
        name: "device", parse(e = r) {
            let n = "Desktop";
            return ye.forEach((function (i) {
                i.parse(e).is && (n = i.name)
            })), {device: n}
        }, async getInfo() {
            var e;
            let n = (null === globalThis || void 0 === globalThis ? void 0 : globalThis.devicePixelRatio) || 1,
                i = (null === globalThis || void 0 === globalThis || null === (e = globalThis.navigator) || void 0 === e ? void 0 : e.deviceMemory) || 4;
            return Object.assign({devicePixelRatio: n, deviceMemory: i}, this.parse())
        }
    }, Se = {
        name: "gpu", parse: () => ({}), async getInfo() {
            let e = "", n = "";
            if (null != i && i.document) {
                let o = i.document.createElement("canvas").getContext("experimental-webgl");
                if (o) {
                    var r, a;
                    let i = o.getExtension("WEBGL_debug_renderer_info"), s = o.getParameter(i.UNMASKED_RENDERER_WEBGL);
                    e = (null === (r = s.match(/ANGLE \((.+?),/)) || void 0 === r ? void 0 : r[1]) || "", n = (null === (a = s.match(/, (.+?) (\(|vs_)/)) || void 0 === a ? void 0 : a[1]) || ""
                }
            }
            return {gpu: e, gpuModel: n}
        }
    };
    const Ee = /\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,
        Te = /\b(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}\b/i;
    let Ae = globalThis.RTCPeerConnection || globalThis.mozRTCPeerConnection || globalThis.webkitRTCPeerConnection;
    var Ie = {
        name: "network", parse: () => ({}), async getInfo() {
            var e, n;
            let r = "unknown", a = null == i || null === (e = i.navigator) || void 0 === e ? void 0 : e.connection;
            return a && (r = a.type || a.effectiveType, "2" != r && "unknown" != r || (r = "wifi")), {
                network: r,
                isOnline: (null == i || null === (n = i.navigator) || void 0 === n ? void 0 : n.onLine) || !1,
                ip: await (async () => {
                    const e = new Set, n = n => {
                        var i;
                        const r = null == n || null === (i = n.candidate) || void 0 === i ? void 0 : i.candidate;
                        if (r) for (const n of [Ee, Te]) {
                            const i = r.match(n);
                            i && e.add(i[0])
                        }
                    };
                    return new Promise((function (i, r) {
                        const a = new Ae({iceServers: [{urls: "stun:stun.l.google.com:19302"}, {urls: "stun:stun.services.mozilla.com"}]});
                        a.addEventListener("icecandidate", n), a.createDataChannel(""), a.createOffer().then((e => a.setLocalDescription(e)), r);
                        let o = 20, s = null, l = function () {
                            try {
                                a.removeEventListener("icecandidate", n), a.close()
                            } catch {
                            }
                            s && clearInterval(s)
                        };
                        s = setInterval((function () {
                            let n = [...e];
                            n.length ? (l(), i(n[0])) : o ? o-- : (l(), i(""))
                        }), 100)
                    }))
                })()
            }
        }
    }, Me = {
        name: "battery", parse: () => ({}), async getInfo() {
            var e;
            let n = !0, r = 1;
            return null != i && null !== (e = i.navigator) && void 0 !== e && e.getBattery && (n = await i.navigator.getBattery().then((e => null == e ? void 0 : e.charging)), r = await i.navigator.getBattery().then((e => +(null == e ? void 0 : e.level) || -1))), {
                isCharging: n,
                battery: r
            }
        }
    };
    var xe = {
        name: "screen", parse: () => ({}), async getInfo() {
            var e, n, r, a;
            return {
                screenWidth: (null == i || null === (e = i.screen) || void 0 === e ? void 0 : e.width) || 0,
                screenHeight: (null == i || null === (n = i.screen) || void 0 === n ? void 0 : n.height) || 0,
                clientWidth: (null == i || null === (r = i.document) || void 0 === r || null === (r = r.documentElement) || void 0 === r ? void 0 : r.clientWidth) || 0,
                clientHeight: (null == i || null === (a = i.document) || void 0 === a || null === (a = a.documentElement) || void 0 === a ? void 0 : a.clientHeight) || 0,
                screenFPS: await async function () {
                    return new Promise((function (e) {
                        let n = 0, i = 1, r = [], a = function (o) {
                            if (n > 0) if (i < 12) r.push(o - n), n = o, i++, requestAnimationFrame(a); else {
                                r.sort(), r = r.slice(1, 11);
                                let n = r.reduce(((e, n) => e + n));
                                const i = 10 * Math.round(1e4 / n / 10);
                                e(i)
                            } else n = o, requestAnimationFrame(a)
                        };
                        requestAnimationFrame(a)
                    }))
                }()
            }
        }
    }, Oe = {
        name: "language", parse: () => ({}), async getInfo() {
            var e, n;
            let r = (null == i || null === (e = i.navigator) || void 0 === e ? void 0 : e.language) || (null == i || null === (n = i.navigator) || void 0 === n ? void 0 : n.browserLanguage);
            if ("string" != typeof r) return "Unknown language";
            let a = r.split("-");
            return a[1] && (a[1] = a[1].toUpperCase()), {language: a.join("_")}
        }
    }, Pe = {
        name: "timezone", parse: () => ({}), async getInfo() {
            var e;
            return {timezone: null === (e = Intl) || void 0 === e || null === (e = e.DateTimeFormat()) || void 0 === e || null === (e = e.resolvedOptions()) || void 0 === e ? void 0 : e.timeZone}
        }
    };
    return {
        parse(e) {
            let n = {};
            return [ge, be, Be].forEach((i => {
                n = Object.assign(n, i.parse(e))
            })), n
        },
        async getInfo(e = ["browser", "system", "device", "gpu", "network", "battery", "screen", "language", "timezone"]) {
            let n = {}, i = [ge, be, Be, Se, Ie, Me, xe, Oe, Pe].filter((n => e.includes(n.name)));
            for (let e of i) n = Object.assign(n, await e.getInfo());
            return n
        }
    }
}));

